package com.worthtech.billportal.bean;

/**
 * MerchantRiskInfoId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class MerchantRiskInfoId implements java.io.Serializable {

	// Fields

	private String merCode;
	private String termId;
	private String effDate;
	private String expDate;

	// Constructors

	/** default constructor */
	public MerchantRiskInfoId() {
	}

	/** full constructor */
	public MerchantRiskInfoId(String merCode, String termId, String effDate,
			String expDate) {
		this.merCode = merCode;
		this.termId = termId;
		this.effDate = effDate;
		this.expDate = expDate;
	}

	// Property accessors

	public String getMerCode() {
		return this.merCode;
	}

	public void setMerCode(String merCode) {
		this.merCode = merCode;
	}

	public String getTermId() {
		return this.termId;
	}

	public void setTermId(String termId) {
		this.termId = termId;
	}

	public String getEffDate() {
		return this.effDate;
	}

	public void setEffDate(String effDate) {
		this.effDate = effDate;
	}

	public String getExpDate() {
		return this.expDate;
	}

	public void setExpDate(String expDate) {
		this.expDate = expDate;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MerchantRiskInfoId))
			return false;
		MerchantRiskInfoId castOther = (MerchantRiskInfoId) other;

		return ((this.getMerCode() == castOther.getMerCode()) || (this
				.getMerCode() != null
				&& castOther.getMerCode() != null && this.getMerCode().equals(
				castOther.getMerCode())))
				&& ((this.getTermId() == castOther.getTermId()) || (this
						.getTermId() != null
						&& castOther.getTermId() != null && this.getTermId()
						.equals(castOther.getTermId())))
				&& ((this.getEffDate() == castOther.getEffDate()) || (this
						.getEffDate() != null
						&& castOther.getEffDate() != null && this.getEffDate()
						.equals(castOther.getEffDate())))
				&& ((this.getExpDate() == castOther.getExpDate()) || (this
						.getExpDate() != null
						&& castOther.getExpDate() != null && this.getExpDate()
						.equals(castOther.getExpDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMerCode() == null ? 0 : this.getMerCode().hashCode());
		result = 37 * result
				+ (getTermId() == null ? 0 : this.getTermId().hashCode());
		result = 37 * result
				+ (getEffDate() == null ? 0 : this.getEffDate().hashCode());
		result = 37 * result
				+ (getExpDate() == null ? 0 : this.getExpDate().hashCode());
		return result;
	}

}